package com.iflytek.uoamp.agent.core.sender.monitorsender.requestObj;

public enum ItemTypes {
	ERROR, VASERVER, VACLIENTSERVER,CHECKSERVICE,OSSP_1_4,OSSP_2_1,BOSS_MONITOR,PAGE_MONITOR,PHONESERVER,API,CHECKLOCAL,CHECKLIB;

	public static String caseToString(ItemTypes item) {
		if (item == ItemTypes.VASERVER)
			return "vaserver";
		else if (item == ItemTypes.VACLIENTSERVER)
			return "vaclientserver";
		else if (item == ItemTypes.CHECKSERVICE)
			return "checkservice";
		else if (item == ItemTypes.OSSP_1_4)
			return "ossp1.4";
		else if (item == ItemTypes.OSSP_2_1)
			return "ossp2.1";
		else if (item == ItemTypes.BOSS_MONITOR)
			return "boss_monitor";
		else if (item == ItemTypes.PAGE_MONITOR)
			return "page_monitor";
		else if (item == ItemTypes.PHONESERVER)
			return "phoneserver";
		else if (item == ItemTypes.API)
			return "api";
		else if (item == ItemTypes.CHECKLOCAL)
			return "checklocal";
		else if (item == ItemTypes.CHECKLIB)
			return "checklib";
		return "error";
	}

	public static ItemTypes caseToObject(String str) {

		if (str.equals("vaserver")) {
			return (ItemTypes.VASERVER);
		} else if (str.equals("vaclientserver")) {
			return (ItemTypes.VACLIENTSERVER);
		} else if (str.equals("checkservice")) {
			return (ItemTypes.CHECKSERVICE);
		} else if (str.equals("ossp1.4")) {
			return (ItemTypes.OSSP_1_4);
		} else if (str.equals("ossp2.1")) {
			return (ItemTypes.OSSP_2_1);
		}  else if (str.equals("boss_monitor")) {
			return (ItemTypes.BOSS_MONITOR);
		} else if (str.equals("page_monitor")) {
			return (ItemTypes.PAGE_MONITOR);
		} else if (str.equals("phoneserver")){
			return ItemTypes.PHONESERVER;
		} else if (str.equals("api")){
			return ItemTypes.API;
		} else if (str.equals("checklocal")){
			return ItemTypes.CHECKLOCAL;
		} else if (str.equals("checklib")){
			return ItemTypes.CHECKLIB;
		}else {
			return (ItemTypes.ERROR);
		}
	}
}
